package com.timothy.question;

import java.util.ArrayList;
import java.util.List;

public class PriorityQuestion extends BaseQuestion{
	
	private List<Choice> choices = new ArrayList<Choice>();
	
	public void addChoice(Choice choice){
		choices.add( choice );
	}

	public List<Choice> getChoices() {
		return choices;
	}

	public void setChoices(List<Choice> choices) {
		this.choices = choices;
	}
	
	public String answerMessage(){
		StringBuffer sb = new StringBuffer();
		for(Choice choice:choices){
			sb.append(choice.getMark()+",");
		}
		if(sb.length()>0){
			return sb.substring(0, sb.length()-1);
		}else{
			return null;
		}
	}
	
}
